<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>出差申请</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<link rel="stylesheet" href="../../layui/css/layui.css"  media="all">
	<!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<script src="../../js/jquery-3.4.1.js"></script>
<script src="../../layui/layui.js" charset="utf-8"></script>
<body style="padding: 10px;background-color: rgb(236,240,245);">
	<h1 style="margin-bottom: 20px;">出差申请</h1>
	<!-- 表单区+返回按钮 -->
	<div style="background-color: white;">
		<div class="layui-row">
			<!-- 返回按钮 -->
			<div class="layui-col-xs1" style="padding-left: 10px;padding-top: 10px;">
				<button type="button" class="layui-btn layui-btn-sm layui-btn-normal"><i class="layui-icon layui-icon-left"></i>返回</button>
			</div>
		</div>
		<!-- 蓝色分割线 -->
		<hr class="layui-bg-blue">
		<h1 style="text-align: center;margin-bottom: 50px;">出差申请单</h1>
		<form class="layui-form layui-form-pane" action="" style="padding-left: 110px;">
			<!-- 第一排 -->
			<div class="layui-form-item">
				<div class="layui-inline" style="width: 45%">
					<label class="layui-form-label">标题</label>
					<div class="layui-input-block">
						<input name="title" required  lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-inline" style="width: 45%">
					<label class="layui-form-label">紧急程度</label>
					<div class="layui-input-block">
						<select name="city" lay-verify="required">
							<option value=""></option>
						</select>
					</div>
				</div>
			</div>
			<!-- 第二排 -->
			<div class="layui-form-item">
				<div class="layui-inline" style="width: 45%">
					<label class="layui-form-label">申请人</label>
					<div class="layui-input-block">
						<input name="title" placeholder="" readonly="readonly" autocomplete="off" class="layui-input" value="自己">
					</div>
				</div>
				<div class="layui-inline" style="width: 45%">
					<label class="layui-form-label">外出类型</label>
					<div class="layui-input-block">
						<select name="city">
							<option value=""></option>
						</select>
					</div>
				</div>
			</div>
			<!-- 第三排 -->
			<div class="layui-form-item">
				<div class="layui-inline" style="width: 45%">
					<label class="layui-form-label">开始日期</label>
					<div class="layui-input-block">
						<input id="begin" name="title" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-inline" style="width: 45%">
					<label class="layui-form-label">结束日期</label>
					<div class="layui-input-block">
						<input id="end" name="title" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
					</div>
				</div>
			</div>
			<!-- 第四排 -->
			<div class="layui-form-item">
				<div class="layui-inline" style="width: 45%;">
					<label class="layui-form-label">出差原因</label>
					<textarea name="desc" placeholder="请输入内容" class="layui-textarea"></textarea>
				</div>
				<div class="layui-inline" style="width: 45%;margin-top: -100px;">
					<label class="layui-form-label">审核人员</label>
					<div class="layui-input-block">
						<input name="title" required readonly lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
						<button type="button" class="layui-btn layui-btn-xs" onclick="openUser()" style="position: absolute;top: 8px;right: 10px">添加</button>
					</div>
				</div>
			</div>
			<!-- 功能按钮 -->
			<div class="layui-form-item" style="padding: 15px 0;">
				<div class="layui-inline">
					<button class="layui-btn" lay-submit lay-filter="submitBtn">保存</button>
					<button type="reset" class="layui-btn layui-btn-primary">重置</button>
				</div>
			</div>
		</form>
	</div>
</body>
<script>
	//form模块
	layui.use('form', function(){
	  var form = layui.form;
	  
	  //监听提交
	  form.on('submit(submitBtn)', function(data){
	    layer.msg(JSON.stringify(data.field));
	    return false;
	  });
	});

	//日历模块
	layui.use('laydate',function () {
		var laydate = layui.laydate;

		laydate.render({
			elem: '#begin' ,//指定元素
			type: 'datetime'
		});
		laydate.render({
			elem: '#end' ,//指定元素
			type: 'datetime'
		});
	});

	function openUser() {

		layer.open({
			type: 2,//弹出一个iframe层
			content: 'userList.html',
			area: ['900px', '500px'],
			btn: ['确定', '取消'],
			yes:function (index, layero) {
				//弹出层body的jQuery对象
				var body = layer.getChildFrame("body",index);
			}
		});
	}
</script>
</html>